package com.blog.web.controller;

import com.blog.common.core.domain.R;
import com.blog.common.core.web.domain.AjaxResult;
import com.blog.common.domain.vo.PhotoAlbumVo;
import com.blog.web.service.PhotoAlbumService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 相册控制器
 * </p>
 *
 * @author Valerie
 * @date 2023/3/1
 **/
@Api(tags = "相册模块")
@RestController
public class PhotoAlbumController {

    @Resource
    private PhotoAlbumService photoAlbumService;

    /**
     * 获取相册列表
     *
     * @return {@link R<List<PhotoAlbumVo>>} 相册列表
     */
    @ApiOperation(value = "获取相册列表")
    @GetMapping("/photos/albums")
    public R<List<PhotoAlbumVo>> listPhotoAlbums() {
        return R.ok(photoAlbumService.listPhotoAlbums());
    }
}
